﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.Contracts;
using System.Reflection;
using System.Text;
using OpenLS.Core.Notification;

namespace OpenLS.Spreadsheet.UI
{
    class DataValidationViewModel : ViewModelBase
    {
        private readonly DataValidation _dataValidation;

        public DataValidationViewModel(DataValidation dataValidation)
        {
            Contract.Requires(dataValidation != null);
            this._dataValidation = dataValidation;
        }


        public DataValidationType Type
        {
            get { return _dataValidation.Type; }
            set { _dataValidation.Type = value; notifyPropertyChanged("Type"); }
        }

        public DataValidationOperator Operator
        {
            get { return _dataValidation.Operator; }
            set { _dataValidation.Operator = value; notifyPropertyChanged("Operator"); }
        }

        public DataValidation Model
        {
            get {
                return _dataValidation;
            }
        }
        public string FirstFormulaLabel
        { get { return "Formula"; } }
        public string SecondFormulaLabel
        { get { return "Formula"; } }
    }
}
